// 管理账号信息
const USERS_KEY = 'jaloginName';
//认证信息 
const Authorization="jaAuthorization"

//从本地存储中获取用户信息
const getUser =function(){	
	let ret= uni.getStorageSync(USERS_KEY);
	return ret;
}

const getAuthorization =function(){
	let ret= uni.getStorageSync(Authorization);
	return ret;
}

const checkLogin=function(){
					/* 获取用户姓名 */
					let user= uni.getStorageSync(USERS_KEY);
					/* 获取 */
					let authorization= uni.getStorageSync(Authorization);
					if(user=='' || this.authorization==''){
						//用户未登录
						 uni.redirectTo({
						 	url:'/pages/login/login'
						 })
						return null
					}else{
						return user+"/"+authorization
					}	
			}
export default {
	getUser,
	getAuthorization,
	checkLogin
}

